﻿<Window x:Class="ReportingManagement.Components.Queries.QueryCategoryEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" SizeToContent="Height" Width="400" Title="Query Category Editor"
             d:DesignHeight="221" d:DesignWidth="300" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" Closing="Window_Closing">
    <Grid Margin="10">
        <Grid.Resources>
            <Style TargetType="{x:Type Label}">
                <Setter Property="Margin" Value="0,20,0,2" />
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="Padding" Value="0" />
            </Style>
            <Style TargetType="{x:Type TextBox}">
                <Setter Property="Background" Value="#FFFAFAFF" />
                <Setter Property="Margin" Value="0,0,0,10" />
            </Style>
            <Style TargetType="{x:Type Button}">
                <Setter Property="Margin" Value="5,0,0,3" />
                <Setter Property="Padding" Value="10,3" />
            </Style>
        </Grid.Resources>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>     
        
        <Label Content="Category Name" />
        <TextBox x:Name="txtName" Grid.Row="1" Text="{Binding Name}" />
        
        <Label Grid.Row="2" Content="Category Description" />
        <TextBox x:Name="txtDescription" Grid.Row="3" TextWrapping="Wrap" Text="{Binding Description}" />
        
        <DockPanel Grid.Row="4">
            <Button x:Name="btnCancel" Content="Cancel" DockPanel.Dock="Right" IsCancel="True" />
            <Button x:Name="btnReset" Content="Reset" DockPanel.Dock="Right" Click="btnReset_Click" />
            <Button x:Name="btnSave" Content="Save" DockPanel.Dock="Right" HorizontalAlignment="Right" IsDefault="True" Click="btnSave_Click" />
        </DockPanel>
    </Grid>
</Window>
